<div>
  <form class="form-horizontal" role="form" novalidate name="myForm">
    <div class="form-ctrl md-whiteframe-z1">
      <div class="form-search" style="height:280px;" ng-class="{true: 'shou'}[shoumun.num==0]" ng-switch on="sendData.timeType">
        <div>
          <label style="">账期</label>
          <md-select ng-model="sendData.timeType">
            <md-option ng-value="item.timeTypeCode" ng-repeat="item in timeTypes" ng-click="changeTime(item.timeTypeCode,sendData)">{{item.timeTypeName}}</md-option>
          </md-select>
        </div>
        <div  ng-switch-when="0">
           <md-input-container flex>
             <label >开始时间</label>
             <input type="datetime-local" ng-model="sendData.startTime"  time-validate="hours" end-time="sendData.endTime"  required name="startDateTime">
             <div ng-messages="myForm.startDateTime.$error">
               <div ng-message="date">请正确输入时间</div>
               <div ng-message="time-error">开始时间不应大于结束时间</div>
               <div ng-message="too-great">结束时间不应大于当前时间</div>
             </div>
           </md-input-container>
         </div>
         <div  ng-switch-when="0" >
           <md-input-container flex>
             <label >结束时间</label>
             <input type="datetime-local" ng-model="sendData.endTime"  time-validate="hours" start-time="sendData.startTime" required name="endDateTime">
             <div ng-messages="myForm.endDateTime.$error">
               <div ng-message="date">请正确输入时间</div>
               <div ng-message="time-error">开始时间不应大于结束时间</div>
               <div ng-message="too-great">结束时间不应大于当前时间</div>
             </div>
           </md-input-container>
         </div>
        <div ng-switch-when="1">
          <md-input-container flex>
            <label>开始时间</label>
            <input type="date" ng-model="sendData.startTime"  time-validate="day" end-time="sendData.endTime" required
                   name="startDate">
            <div ng-messages="myForm.startDate.$error">
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <div ng-switch-when="1">
          <md-input-container flex>
            <label>结束时间</label>
            <input type="date" ng-model="sendData.endTime"  time-validate="day" start-time="sendData.startTime" required name="endDate">
            <div ng-messages="myForm.endDate.$error">
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <div>
          <label style="width:70px">类型</label>
          <md-select ng-model="sendData.type"  >
            <md-option ng-value="t.code" ng-repeat="t in types">{{t.name}}</md-option>
          </md-select>
        </div>
        <div>
          <label style="width:70px">设备名称</label>
          <md-select multiple ng-model="sendData.equipmen" ng-click="getEquipmen(sendData.type)">
            <md-select-label>
              {{sendData.equipmen.length ? _getNames(sendData.equipmen,'name',equipmens) :'全部'}}
            </md-select-label>
            <md-option ng-value="" ng-click="_checkAll(sendData,'equipmen')">全部</md-option>
            <md-option ng-value="eq" ng-repeat="eq in equipmens">{{eq.name}}</md-option>
          </md-select>
        </div>
         <!-- <div>
          <label style="width:70px">标杆类型</label>
          <md-select ng-model="sendData.standardType" >
            <md-option ng-value="st.code" ng-repeat="st in standardTypes">{{st.name}}</md-option>
          </md-select>
        </div> -->
      </div>
      <i class="glyphicon glyphicon-chevron-up shrinkage" ng-show="!btnDisabled" ng-click="shoumun.num=0"></i>
      <md-button ng-disabled="btnDisabled"  ng-click="shoumun.num==1?shoumun.num=0:shoumun.num=1;search()" class="md-fab md-primary md-hue-1" aria-label="Profile"> <i class="glyphicon glyphicon-arrow-down"
      style="margin-top:28px;"  ng-show="shoumun.num==0"></i>
        <i class="glyphicon glyphicon-search" ng-show="shoumun.num==1"></i>
      </md-button>
    </div>
  </form>
  <div class="table-info">
    <div class="menus" ng-show="show.state === 'table'">
      <md-button ng-click="back()" class="md-raised ico-btn">返回</md-button>
      <span ng-show="showBack" class="division"></span>
    </div>
    <div ng-show="show.state === 'view'">
      <div id="doc" style="height:450px;padding: 15px;"></div>
    </div>
    <div ng-show="show.state === 'table'">
      <div class="table-detail">
        <div class="t_r">
          <table class="table table-bordered">
            <caption style="text-align:center;font-weight:bold;"> <font color="black">{{title}}</font>
            </caption>
            <thead>
              <tr>
                <th>序号</th>
                <th>时间</th>
                <th>IP名称</th>
                <th>类型</th>
                <th>设备名称</th>
                <th>告警量</th>
                <!-- <th>环比/同比增加减少</th> -->
              </tr>
            </thead>
            <tbody class="table table-bordered">
              <tr ng-repeat="item in items">
                <td>{{$index+1}}</td>
                <td>{{item.time}}</td>
                <td>{{item.ipName}}</td>
                <td>{{item.typeName}}</td>
                <td>{{item.equipmentName}}</td>
                <td>{{item.alarmNum}}</td>
                <!-- <td>{{}}</td> -->
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>
</div>